public class IteratorTest {

	public static void main(String[] args) {

		MyList numbers = new MyList();

		System.out.println("Iterator Test");
		System.out.println("-------------");
		/*
		 * Fill numbers: 0-19
		 */
		for (int i = 0; i < 20; i++) {
			numbers.add(i);
		}
		
		System.out.println(numbers.size());
		/*
		 * Iteration
		 */
		for (Integer i : numbers) {
			System.out.print(i + " ");
		}
		System.out.println("\n-------------");

	
		numbers.clear();
		/*
		 * Fill with random numbers
		 */
		for (int i = 0; i < 50; i++) {
			numbers.add((int) (Math.random() * 50));
		}
		System.out.println(numbers.size());
		/*
		 * Iteration
		 */
		for (Integer i : numbers) {
			System.out.print(i + " ");
		}

		System.out.println("\n-------------");
		System.out.println();
		
		
		numbers.clear();
		numbers.add(3);
		numbers.add(5);
		numbers.add(6);
		for (Integer i : numbers) {
			System.out.print(i + " ");
		}
		

	}

}
